package com.cy.service;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.cy.condition.BackRoleCondition;
import com.cy.entity.BackRole;
import com.cy.entity.BackUser;

@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public interface BackRoleService <T> extends BaseService<T> {
	
	/**
	 * 通过DWR保存角色
	 */
	public BackRole saveBackRoleDWR(BackRole backRole,String purviewStr);
	
	/**
	 * 通过Condition查询角色集合
	 */
	public List<BackRole> listBackRoleByCondition(int firstResult, int maxResults,BackRoleCondition condition);
	
	/**
	 * 通过角色ID查询详细角色信息 包含 权限集合
	 */
	public BackRole findDetailBackRoleById(Long id);
	
	/**
	 * 通过角色ID查询对应的后台用户
	 */
	public List<BackUser> findBackUserByRoleId(Long roleId);
	
	/**
	 * 通过角色ID查询非对应的后台用户
	 */
	public List<BackUser> findBackUserNotEqualRoleId(Long roleId);
	
	
	
	
}
